<div class="row">
    <div class="col-md-12 widget-module">
        <div class="box-widget">
            <div class="widget-head clearfix">
                <h4 class="pull-left"><?php echo $this->translate('create user group'); ?></h4>
            </div>
            
            <div class="widget-container">
                <div class="widget-block">
                    <div class="widget-content">
                        <form id="usergroup" method="post" class="form-horizontal form-box">
                            <div class="form-group <?php echo $this->classError['group_name']; ?>">
                                <label class="col-lg-2 control-label"><?php echo $this->translate('group name'); ?></label>
                                <div class="col-lg-4">
                                    <input class="form-control" type="text" value="<?php echo $this->data['group_name']; ?>" name="group_name" class="form-control" placeholder="<?php echo $this->translate('group name'); ?>" />
                                    <?php echo $this->messageError['group_name']; ?>
                                </div>
                            </div>
                            
                            <div class="form-group <?php echo $this->classError['description']; ?>">
                                <label class="col-lg-2 control-label"><?php echo $this->translate('description'); ?></label>
                                <div class="col-lg-4">
                                    <input class="form-control" type="text" value="<?php echo $this->data['description']; ?>" name="description" class="form-control" placeholder="<?php echo $this->translate('description'); ?>" />
                                    <?php echo $this->messageError['description']; ?>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label class="col-lg-2 control-label"><?php echo $this->translate('status'); ?></label>
                                <div class="col-lg-4">
                                    <div class="checkbox">
                                        <label>
                                            <input <?php if($this->data['status']) echo 'checked="checked"'; ?> type="checkbox" name="status" value="1" />
                                            <?php echo $this->translate('active'); ?>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label class="col-lg-2 control-label">&nbsp;</label>
                                <div class="col-lg-4">
                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">
                                            <i class="icon-save"></i>
                                            <?php echo $this->translate('save'); ?>
                                        </button>
                                        <button id="cancel" type="button" class="btn">
                                            <i class="icon-cancel-circle-2"></i>
                                            <?php echo $this->translate('cancel'); ?>
                                        </button>
                                    </div>
                                </div>
                            </div> 
                            <?php if(isset($this->data['id']) && $this->data['id'] > 0): ?>
                            <input type="hidden" name="id" value="<?php echo $this->data['id']; ?>" />
                            <input type="hidden" name="save" value="1" />
                            <?php endif; ?>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
$("#cancel").click(function(){
    window.location = "<?php echo $this->url(array('module' => 'admin', 'controller' => 'product-category', 'action' => 'index'), null, true); ?>";
});
</script>